/*
 * Copyright (C) 2021 Fastjrun, Inc. All Rights Reserved.
 */
package com.fastjrun.share.demo.helper;

import com.fastjrun.share.demo.dto.UserDTO;
import com.fastjrun.share.demo.entity.SysUser;

public class DTOToEntifyConverter {
    public static final SysUser convert(UserDTO userDTO) {
        SysUser sysUser = new SysUser();
        sysUser.setIsAccountNonExpired(userDTO.getIsAccountNonExpired());
        sysUser.setIsCredentialsNonExpired(userDTO.getIsCredentialsNonExpired());
        sysUser.setNickName(userDTO.getNickName());
        sysUser.setIsEnabled(userDTO.getIsEnabled());
        sysUser.setMobile(userDTO.getMobile());
        sysUser.setIsAccountNonLocked(userDTO.getIsAccountNonLocked());
        sysUser.setId(userDTO.getId());
        sysUser.setEmail(userDTO.getEmail());
        sysUser.setUsername(userDTO.getUsername());
        return sysUser;

    }
}
